<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<body class="page-header-fixed">
	<div>
		<a class="btn blue" href="javascript:;"
			data-target="#paymentGatewayModel" data-toggle="modal"
			ng-click="addSmsConfigure()"> <i class="fa fa-plus"></i> 新增
		</a>
	</div>
	<table class="table table-striped table-bordered table-hover"
		id="table_1">
		<thead>
			<tr>
				<th>运营商</th>
				<th>渠道</th>
				<th>备注</th>
				<th>是否启用</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="odd gradeX"
				ng-repeat="smsConfigure in smsConfigurelist  track by $index"
				on-loaded="{{$last}}" target-table="table_1">
				<td><span
					ng-bind="smsConfigure.merchantCode | getValueInArgFilter : merchantMap : 'name'"></span>
				</td>
				<td><span
					ng-bind="smsConfigure.smsChannel | getValueInArgFilter : smsSendChannelMap : 'value'"></span>
				</td>
				<td><span ng-bind="smsConfigure.comment"
					style="display: block; width: 200px; text-overflow: ellipsis; overflow: hidden;"></span></td>
				<td><span
					ng-bind="smsConfigure.isUsed | getValueInStaticFilter : 'validArray'"></span>
				</td>
				<td><a class="btn" href="javascript:;"
					data-target="#paymentGatewayModel" data-toggle="modal"
					ng-click="updateSmsConfigure(smsConfigure);"> 修改 </a> <a
					class="btn" href="javascript:;"
					ng-click="deleteSmsConfigure(smsConfigure);"> 删除 </a></td>
			</tr>
		</tbody>
	</table>

	<div id="paymentGatewayModel" class="modal fade" role="dialog"
		aria-hidden="true" data-backdrop="false">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">×</button>
					<h4 class="modal-title">短信平台配置新增/修改</h4>
				</div>
				<div class="modal-body form">
					<div class="form-group">
						<div class="row">
							<label class="col-sm-4 control-label text-right">运营商</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control" ng-disabled="updateDisabled"
										ng-options="merchant.merchantCode as merchant.shortName for merchant in validMerchantMap"
										ng-model="smsConfigure.merchantCode">
										<option value="">请选择运营商</option>
									</select>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-4 control-label text-right">短信发送渠道</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control" ng-disabled="updateDisabled"
										ng-model="smsConfigure.smsChannel">
										<option value="">请选择短信发送渠道</option>
										<option ng-repeat="(x, y)  in smsSendChannelMap"
											value="{{y.smsChannel}}">{{y.value}}</option>
									</select>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-4 control-label text-right">短信接口地址</label>
							<div class="col-sm-8">
								<div class="input-group">
									<input type="text" class="form-control bValidate"
										key="maxlength_128" ng-model="smsConfigure.url" />
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-4 control-label text-right">备注</label>
							<div class="col-sm-8">
								<div class="input-group">
									<input type="text" class="form-control bValidate"
										maxlength='200' key="maxlength_128"
										ng-model="smsConfigure.comment" />
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-4 control-label text-right">是否启用</label>
							<div class="col-md-8">
								<div class="radio-list">
									<label class="radio-inline"> <input
										ng-model="smsConfigure.isUsed" type="radio" value="1"
										ng-selected="smsConfigure.isUsed==1"> 启用
									</label> <label class="radio-inline"> <input
										ng-model="smsConfigure.isUsed" type="radio" value="0"
										ng-selected="smsConfigure.isUsed==0"> 停用
									</label>
								</div>
							</div>
						</div>
						<hr />
						<input type="button" name="xx" ng-click="addNewRow()" value="增加" />
						<input type="button" name="yy" ng-click="removeRow()" value="删除" />
						<form id="parameterForm">
							<table class="table table-striped table-bordered table-hover"
								id="myTab">
								<thead>
									<tr>
										<th width="15%">paramName</th>
										<th width="15%">paramKey</th>
										<th width="60%">paramValue</th>
										<th width="10%">operation</th>
									</tr>
								</thead>
								<tbody>
									<tr class="odd gradeX"
										ng-repeat="smsParameter in smsConfigure.smsParameterVOList  track by $index"
										on-loaded="{{$last}}" target-table="table_1">
										<td><input type='text' name='paramName' maxlength='30'
											id='nodecode' "+rowsNum+" style='width: 100%'
											value="{{smsParameter.paramName}}" /></td>
										<td><input type='text' name='paramKey' maxlength='20'
											id='nodename' "+rowsNum+" style='width: 100%'
											value="{{smsParameter.paramKey}}" /></td>
										<td><input type='text' name='paramValue' maxlength='200'
											id='nodeper' "+rowsNum+" style='width: 100%'
											value="{{smsParameter.paramValue}}" /></td>
										<td><input type='checkbox' name='chkArr' id='chkArr'
											"+rowsNum+" style='width: 100%' /></td>
									</tr>
								</tbody>
							</table>
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<!--<button type="button" class="btn btn-danger" ng-click="winClose(smsConfigure);" >
						<i class="fa fa-check"></i>关闭
					</button>-->
					<button type="button" class="btn btn-danger" ng-click="winClose();"  data-dismiss="modal"><i class="fa fa-times"></i>关闭</button>
					<button type="button" class="btn btn-primary"
						ng-click="saveSmsConfigure();">
						<i class="fa fa-check"></i>保存
					</button>
				</div>
			</div>
		</div>
	</div>
</body>
</html>